/*
 * @Description: 收集 - 映射关系
 * @Author: Rfan
 * @Date: 2022-12-29 11:03:03
 * @LastEditTime: 2023-02-15 18:39:15
 */

import { MappingRelationContextProvider } from './contexts/MappingRelationContext';
import PageLayout from '@/layout/PageLayout';
import OperateList from './components/OperateList';
import NavSidebar from './components/NavSidebar';
import styles from './styles/mappingRelation.module.scss';
import classNames from 'classnames/bind';
import { EnumMappingRouteTypes } from '@/view/system/MappingRelation/dictionaries';
import { MappingRouterTypeContext } from './contexts/MappingRouterTypeContext';

const cx = classNames.bind(styles);
interface IMappingProps {
  routerType?: EnumMappingRouteTypes;
  classification?: number;
}
export const MappingRelation = (props: IMappingProps) => {
  const { routerType = EnumMappingRouteTypes.Library, classification = 2 } = props;
  return (
    <MappingRouterTypeContext.Provider value={{ routerType, classification }}>
      <MappingRelationContextProvider>
        <PageLayout className={cx('fond-wrap')} sidebar={<NavSidebar />}>
          <OperateList />
        </PageLayout>
      </MappingRelationContextProvider>
    </MappingRouterTypeContext.Provider>
  );
};
const CollectionMappingRelation = () => {
  return <MappingRelation routerType={EnumMappingRouteTypes.Accession} classification={2} />;
};
export default CollectionMappingRelation;
